<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace app\cpmjagent\model\finance;

/**
 * Description of GemsDetailModel
 *
 * @author SoChishun
 */
class GemsDetailModel extends \app\cpmjagent\model\AppbaseModel {
    protected $table = 't_finance_gems_detail';
    protected $autoWriteTimestamp = 'timestamp';
    // 更新时间字段
    protected $updateTime = '';
    protected function getCreateTimeTextAttr() {
        return date('Y-m-d H:i',strtotime($this->create_time));
    }
    protected function getTradeTypeTextAttr(){
        switch($this->trade_type){
            case 'sharefriend':
                return '分享好友';
            case 'sharetimeline':
                return '分享朋友圈';
            case 'admin_direct_recharge_agent':
                return '管理员直充渠道';
            case 'admin_direct_recharge_gameuser':
                return '管理员直充玩家';
            case 'agent_direct_recharge_gameuser':
                return '渠道直充玩家';
        }
        return '';
    }
}
